import Taro, { Component } from '@tarojs/taro';
import { View, Button, Icon } from '@tarojs/components'
import './feedback.scss'

class feedback extends Component {


  render() {
    const success = (
      <View className="feedback" >
        <Icon type="success" size="50"></Icon>数据发布成功
        <Button onClick={()=>this.props.gohome()}>返回首页</Button>
      </View>
    );

    const fail = (
      <View className="feedback" >
        <Icon type="warn" size="50"></Icon>数据发布失败
        <Button onClick={()=>this.props.republish()}>重新发布</Button>
      </View>
    )

    return (
      <View>
      {
        this.props.issuccess ? success : fail
      }
      </View>
    );
  }
}

export default feedback;